<?php

include("setup.php");

$setup = new setup();

$isfavorite = $_GET['isfavorite'];
$adid = $_GET['adid'];

if($isfavorite==0) {
	
	$setup->qry("Insert into FAVOURITES (fav_userid,fav_adid) VALUES ('".$_SESSION['userid']."','".$adid."')");
	
}else{

	$setup->qry("Delete from FAVOURITES where fav_userid=".$_SESSION['userid']." and fav_adid=".$adid);
}

?>
